package cn.orangeframe.neon.application.exception;

import cn.orangeframe.neon.domain.enums.WorkflowStatus;
import cn.orangeframe.neon.domain.model.TaskModel;

public class TerminateWorkflowException extends RuntimeException {

    public WorkflowStatus workflowStatus;

    public TaskModel task;

    public TerminateWorkflowException(String reason) {
        this(reason, WorkflowStatus.FAILED);
    }

    public TerminateWorkflowException(String reason, WorkflowStatus workflowStatus) {
        this(reason, workflowStatus, null);
    }

    public TerminateWorkflowException(String reason, WorkflowStatus workflowStatus, TaskModel task) {
        super(reason);
        this.workflowStatus = workflowStatus;
        this.task = task;
    }
}
